<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibDriver DS18B20: test/driver_ds18b20_read_test.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="doxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibDriver DS18B20
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">DS18B20 full function driver</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('driver__ds18b20__read__test_8c_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">driver_ds18b20_read_test.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="driver__ds18b20__read__test_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="driver__ds18b20__read__test_8h.html">driver_ds18b20_read_test.h</a>&quot;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="keyword">static</span> <a class="code" href="structds18b20__handle__s.html">ds18b20_handle_t</a> gs_handle;        </div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="group__ds18b20__test__driver.html#gaeeb0a8054e6c02fb9854cece8fd3deb9">   50</a></span>&#160;uint8_t <a class="code" href="group__ds18b20__test__driver.html#gaeeb0a8054e6c02fb9854cece8fd3deb9">ds18b20_read_test</a>(uint32_t times)</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;{</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    uint8_t res;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    uint32_t i;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    int16_t raw;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordtype">float</span> temperature;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    uint8_t rom[8];</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    <a class="code" href="structds18b20__info__s.html">ds18b20_info_t</a> info;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;   </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="comment">/* link interface function */</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#gaeb6d8c99dd1508afac2d506e0fbba748">DRIVER_DS18B20_LINK_INIT</a>(&amp;gs_handle, <a class="code" href="structds18b20__handle__s.html">ds18b20_handle_t</a>);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#ga995e0ba6342a4fdd07464acfd3ded21b">DRIVER_DS18B20_LINK_BUS_INIT</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#gaae02ff3e162c03d6d44c502aa2c7c287">ds18b20_interface_init</a>);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#gada03625a3e86545827079d7025dce366">DRIVER_DS18B20_LINK_BUS_DEINIT</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#ga03a7158f8be182347f2263bb61efb869">ds18b20_interface_deinit</a>);</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#gab9c69affb4d2f518a8dd716a4ae0e582">DRIVER_DS18B20_LINK_BUS_READ</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#gab0b723752250505718028cea3bfe2e33">ds18b20_interface_read</a>);</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#ga68d0440d16dd362e2f89bf3c6945d3cd">DRIVER_DS18B20_LINK_BUS_WRITE</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#ga58ec641650609db605a648fc4d9709f0">ds18b20_interface_write</a>);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#gada3646f54931552e58b3955042b3f3a1">DRIVER_DS18B20_LINK_DELAY_MS</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#gad39c2a4f7dba94bfa1c5c60dd9879c4b">DRIVER_DS18B20_LINK_DELAY_US</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#gaffa80ae3f3b868b8acec66e67cd6533b">ds18b20_interface_delay_us</a>);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#ga05c7f541eb13b7fc53e17e88c4dec347">DRIVER_DS18B20_LINK_ENABLE_IRQ</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#gaf6df67e763bd6dc9cd1f9b3f81a4ba77">ds18b20_interface_enable_irq</a>);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#ga02ffa673971e5a9c312a49db319a1a60">DRIVER_DS18B20_LINK_DISABLE_IRQ</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#gae2c7e5e56d2c7c9cbe0708c33b0fa08e">ds18b20_interface_disable_irq</a>);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <a class="code" href="group__ds18b20__link__driver.html#ga69860fef169e92a4e642304244c878be">DRIVER_DS18B20_LINK_DEBUG_PRINT</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="comment">/* get ds18b20 info */</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga73dc824fee896b24252b86e683618ee8">ds18b20_info</a>(&amp;info);</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    {</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: get info failed.\n&quot;</span>);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;       </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    }</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="comment">/* print ds18b20 info */</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: chip is %s.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#af890958c72bd715cc6454a10dc846ae6">chip_name</a>);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: manufacturer is %s.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#ad25285dbf810c90f8eaf3fcef6f2b2ea">manufacturer_name</a>);</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: interface is %s.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#aebaa6c28dd4f2c3dc27566fcb910fd28">interface</a>);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: driver version is %d.%d.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#a41b0bd442708b70d252c50b92c75265a">driver_version</a> / 1000, (info.<a class="code" href="structds18b20__info__s.html#a41b0bd442708b70d252c50b92c75265a">driver_version</a> % 1000) / 100);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: min supply voltage is %0.1fV.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#ad8bde6ddadaf43d951e62f3befb9d35a">supply_voltage_min_v</a>);</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: max supply voltage is %0.1fV.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#a3d2b12bcac7a85ea8646bff9debe8660">supply_voltage_max_v</a>);</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: max current is %0.2fmA.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#a9db82802561bf22d799b03a345f1d1dc">max_current_ma</a>);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: max temperature is %0.1fC.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#a3366a5dce9b829e03c3d321c2b4df3f6">temperature_max</a>);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: min temperature is %0.1fC.\n&quot;</span>, info.<a class="code" href="structds18b20__info__s.html#a8f9dbe66ac0b66ebae0a36fcb4ba368e">temperature_min</a>);</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    }</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    </div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="comment">/* ds18b20 init */</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga42a0bced6314bc11b3c47f1d83bbff9a">ds18b20_init</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: init failed.\n&quot;</span>);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;       </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    }</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="comment">/* start basic read test */</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: start basic read test.\n&quot;</span>);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="comment">/* skip rom mode */</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#gadd246c4e8a5887a1acd710dee214323c">ds18b20_set_mode</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#ggaa76e51e2201d4058f4274ca420c165f6a2240dc3e5f913d272861b29b87e06942">DS18B20_MODE_SKIP_ROM</a>);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: set mode failed.\n&quot;</span>);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: set skip rom.\n&quot;</span>); </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    </div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="comment">/* RESOLUTION_9BIT */</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a5333ef2c5e5ec44213bf3f40bd9aa50b">DS18B20_RESOLUTION_9BIT</a>);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution failed.\n&quot;</span>);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    }</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution 9bit.\n&quot;</span>);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; times; i++)</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    {</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        res = <a class="code" href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a>(&amp;gs_handle, (int16_t *)&amp;raw, (<span class="keywordtype">float</span> *)&amp;temperature);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: read failed.\n&quot;</span>);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;        }</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: temperature: %.01fC.\n&quot;</span>, temperature);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>(2000);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    </div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="comment">/* RESOLUTION_10BIT */</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a6274d477f2d9d92a62050c3375c361a0">DS18B20_RESOLUTION_10BIT</a>);</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    {</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution failed.\n&quot;</span>);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    }</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution 10bit.\n&quot;</span>);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; times; i++)</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    {</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        res = <a class="code" href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a>(&amp;gs_handle, (int16_t *)&amp;raw, (<span class="keywordtype">float</span> *)&amp;temperature);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        {</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;            <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: read failed.\n&quot;</span>);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;            (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;            </div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        }</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: temperature: %.01fC.\n&quot;</span>, temperature);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>(2000);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    }</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    </div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <span class="comment">/* RESOLUTION_11BIT */</span></div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a0396bfa58a01fdd9922771715e1467f6">DS18B20_RESOLUTION_11BIT</a>);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    {</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution failed.\n&quot;</span>);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        </div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    }</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution 11bit.\n&quot;</span>);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; times; i++)</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    {</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        res = <a class="code" href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a>(&amp;gs_handle, (int16_t *)&amp;raw, (<span class="keywordtype">float</span> *)&amp;temperature);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;            <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: read failed.\n&quot;</span>);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;            (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;            </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        }</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: temperature: %.01fC.\n&quot;</span>, temperature);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>(2000);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="comment">/* RESOLUTION_12BIT */</span></div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8af2f20b32fccc2658193d818188ae54ca">DS18B20_RESOLUTION_12BIT</a>);</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    {</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution failed.\n&quot;</span>);</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        </div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution 12bit.\n&quot;</span>);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; times; i++)</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    {</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        res = <a class="code" href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a>(&amp;gs_handle, (int16_t *)&amp;raw, (<span class="keywordtype">float</span> *)&amp;temperature);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        {</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: read failed.\n&quot;</span>);</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;            (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;            </div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: temperature: %.01fC.\n&quot;</span>, temperature);</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>(2000);</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    }</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;    </div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="comment">/* get rom */</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#gaf4d3d3dd0bc24d0c4fa2822bfbc32f35">ds18b20_get_rom</a>(&amp;gs_handle, (uint8_t *)rom);</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    {</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: get rom failed.\n&quot;</span>);</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    }</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga4cf8a45542f1dfdca17347c0870f870f">ds18b20_set_rom</a>(&amp;gs_handle, (uint8_t *)rom);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    {</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: set mode failed.\n&quot;</span>);</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        </div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    }</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    </div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    <span class="comment">/* set match rom mode */</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#gadd246c4e8a5887a1acd710dee214323c">ds18b20_set_mode</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#ggaa76e51e2201d4058f4274ca420c165f6a6fefdf17cbb1204ac17187e4c6c96eeb">DS18B20_MODE_MATCH_ROM</a>);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    {</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: set mode failed.\n&quot;</span>);</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        </div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    }</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: set match rom.\n&quot;</span>);</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    </div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <span class="comment">/* RESOLUTION_9BIT */</span></div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a5333ef2c5e5ec44213bf3f40bd9aa50b">DS18B20_RESOLUTION_9BIT</a>);</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    {</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution failed.\n&quot;</span>);</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;        </div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    }</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution 9bit.\n&quot;</span>);</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; times; i++)</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    {</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        res = <a class="code" href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a>(&amp;gs_handle, (int16_t *)&amp;raw, (<span class="keywordtype">float</span> *)&amp;temperature);</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        {</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: read failed.\n&quot;</span>);</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;            </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        }</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: temperature: %.01fC.\n&quot;</span>, temperature);</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>(2000);</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    }</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    </div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    <span class="comment">/* RESOLUTION_10BIT */</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a6274d477f2d9d92a62050c3375c361a0">DS18B20_RESOLUTION_10BIT</a>);</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    {</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution failed.\n&quot;</span>);</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        </div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    }</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution 10bit.\n&quot;</span>);</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; times; i++)</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    {</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;        res = <a class="code" href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a>(&amp;gs_handle, (int16_t *)&amp;raw, (<span class="keywordtype">float</span> *)&amp;temperature);</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        {</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;            <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: read failed.\n&quot;</span>);</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;            </div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;            <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        }</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: temperature: %.01fC.\n&quot;</span>, temperature);</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>(2000);</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    }</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    </div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    <span class="comment">/* RESOLUTION_11BIT */</span></div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a0396bfa58a01fdd9922771715e1467f6">DS18B20_RESOLUTION_11BIT</a>);</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    {</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution failed.\n&quot;</span>);</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;        </div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    }</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution 11bit.\n&quot;</span>);</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; times; i++)</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    {</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;        res = <a class="code" href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a>(&amp;gs_handle, (int16_t *)&amp;raw, (<span class="keywordtype">float</span> *)&amp;temperature);</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        {</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;            <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: read failed.\n&quot;</span>);</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;            (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;            </div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        }</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: temperature: %.01fC.\n&quot;</span>, temperature);</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>(2000);</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;    }</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;    </div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    <span class="comment">/* RESOLUTION_12BIT */</span></div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    res = <a class="code" href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a>(&amp;gs_handle, <a class="code" href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8af2f20b32fccc2658193d818188ae54ca">DS18B20_RESOLUTION_12BIT</a>);</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    {</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution failed.\n&quot;</span>);</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        </div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;    }</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: scratchpad set resolution 12bit.\n&quot;</span>);</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; times; i++)</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;    {</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;        res = <a class="code" href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a>(&amp;gs_handle, (int16_t *)&amp;raw, (<span class="keywordtype">float</span> *)&amp;temperature);</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        <span class="keywordflow">if</span> (res != 0)</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        {</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;            <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: read failed.\n&quot;</span>);</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;            (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;            </div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;            <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        }</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: temperature: %.01fC.\n&quot;</span>, temperature);</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        <a class="code" href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a>(2000);</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    }</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    </div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    <span class="comment">/* finish read test */</span></div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <a class="code" href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a>(<span class="stringliteral">&quot;ds18b20: finish read test.\n&quot;</span>);</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    (void)<a class="code" href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a>(&amp;gs_handle);</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    </div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;}</div>
<div class="ttc" id="adriver__ds18b20__read__test_8h_html"><div class="ttname"><a href="driver__ds18b20__read__test_8h.html">driver_ds18b20_read_test.h</a></div><div class="ttdoc">driver ds18b20 read test header file</div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_ga42a0bced6314bc11b3c47f1d83bbff9a"><div class="ttname"><a href="group__ds18b20__base__driver.html#ga42a0bced6314bc11b3c47f1d83bbff9a">ds18b20_init</a></div><div class="ttdeci">uint8_t ds18b20_init(ds18b20_handle_t *handle)</div><div class="ttdoc">initialize the chip</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8c_source.html#l01305">driver_ds18b20.c:1305</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_ga4cf8a45542f1dfdca17347c0870f870f"><div class="ttname"><a href="group__ds18b20__base__driver.html#ga4cf8a45542f1dfdca17347c0870f870f">ds18b20_set_rom</a></div><div class="ttdeci">uint8_t ds18b20_set_rom(ds18b20_handle_t *handle, uint8_t rom[8])</div><div class="ttdoc">set the handle rom</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8c_source.html#l00394">driver_ds18b20.c:394</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_ga73dc824fee896b24252b86e683618ee8"><div class="ttname"><a href="group__ds18b20__base__driver.html#ga73dc824fee896b24252b86e683618ee8">ds18b20_info</a></div><div class="ttdeci">uint8_t ds18b20_info(ds18b20_info_t *info)</div><div class="ttdoc">get chip's information</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8c_source.html#l02084">driver_ds18b20.c:2084</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_ga7b55e1d3f3ba9ca53c3a78c1d8d221b4"><div class="ttname"><a href="group__ds18b20__base__driver.html#ga7b55e1d3f3ba9ca53c3a78c1d8d221b4">ds18b20_read</a></div><div class="ttdeci">uint8_t ds18b20_read(ds18b20_handle_t *handle, int16_t *raw, float *temp)</div><div class="ttdoc">read data from the chip</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8c_source.html#l01426">driver_ds18b20.c:1426</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_ga93cfb5e6ae40d2595d55aafcd947f4ba"><div class="ttname"><a href="group__ds18b20__base__driver.html#ga93cfb5e6ae40d2595d55aafcd947f4ba">ds18b20_scratchpad_set_resolution</a></div><div class="ttdeci">uint8_t ds18b20_scratchpad_set_resolution(ds18b20_handle_t *handle, ds18b20_resolution_t resolution)</div><div class="ttdoc">set the resolution in the scratchpad</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8c_source.html#l00469">driver_ds18b20.c:469</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_gaa7b94675deaafbe00917e7e232278c77"><div class="ttname"><a href="group__ds18b20__base__driver.html#gaa7b94675deaafbe00917e7e232278c77">ds18b20_deinit</a></div><div class="ttdeci">uint8_t ds18b20_deinit(ds18b20_handle_t *handle)</div><div class="ttdoc">close the chip</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8c_source.html#l01392">driver_ds18b20.c:1392</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_gadd246c4e8a5887a1acd710dee214323c"><div class="ttname"><a href="group__ds18b20__base__driver.html#gadd246c4e8a5887a1acd710dee214323c">ds18b20_set_mode</a></div><div class="ttdeci">uint8_t ds18b20_set_mode(ds18b20_handle_t *handle, ds18b20_mode_t mode)</div><div class="ttdoc">set the chip mode</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8c_source.html#l00342">driver_ds18b20.c:342</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_gaf4d3d3dd0bc24d0c4fa2822bfbc32f35"><div class="ttname"><a href="group__ds18b20__base__driver.html#gaf4d3d3dd0bc24d0c4fa2822bfbc32f35">ds18b20_get_rom</a></div><div class="ttdeci">uint8_t ds18b20_get_rom(ds18b20_handle_t *handle, uint8_t rom[8])</div><div class="ttdoc">get the chip rom</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8c_source.html#l00420">driver_ds18b20.c:420</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_gga6a1cab097fcad68347f07f97e1bb2af8a0396bfa58a01fdd9922771715e1467f6"><div class="ttname"><a href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a0396bfa58a01fdd9922771715e1467f6">DS18B20_RESOLUTION_11BIT</a></div><div class="ttdeci">@ DS18B20_RESOLUTION_11BIT</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00101">driver_ds18b20.h:101</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_gga6a1cab097fcad68347f07f97e1bb2af8a5333ef2c5e5ec44213bf3f40bd9aa50b"><div class="ttname"><a href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a5333ef2c5e5ec44213bf3f40bd9aa50b">DS18B20_RESOLUTION_9BIT</a></div><div class="ttdeci">@ DS18B20_RESOLUTION_9BIT</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00099">driver_ds18b20.h:99</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_gga6a1cab097fcad68347f07f97e1bb2af8a6274d477f2d9d92a62050c3375c361a0"><div class="ttname"><a href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8a6274d477f2d9d92a62050c3375c361a0">DS18B20_RESOLUTION_10BIT</a></div><div class="ttdeci">@ DS18B20_RESOLUTION_10BIT</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00100">driver_ds18b20.h:100</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_gga6a1cab097fcad68347f07f97e1bb2af8af2f20b32fccc2658193d818188ae54ca"><div class="ttname"><a href="group__ds18b20__base__driver.html#gga6a1cab097fcad68347f07f97e1bb2af8af2f20b32fccc2658193d818188ae54ca">DS18B20_RESOLUTION_12BIT</a></div><div class="ttdeci">@ DS18B20_RESOLUTION_12BIT</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00102">driver_ds18b20.h:102</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_ggaa76e51e2201d4058f4274ca420c165f6a2240dc3e5f913d272861b29b87e06942"><div class="ttname"><a href="group__ds18b20__base__driver.html#ggaa76e51e2201d4058f4274ca420c165f6a2240dc3e5f913d272861b29b87e06942">DS18B20_MODE_SKIP_ROM</a></div><div class="ttdeci">@ DS18B20_MODE_SKIP_ROM</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00081">driver_ds18b20.h:81</a></div></div>
<div class="ttc" id="agroup__ds18b20__base__driver_html_ggaa76e51e2201d4058f4274ca420c165f6a6fefdf17cbb1204ac17187e4c6c96eeb"><div class="ttname"><a href="group__ds18b20__base__driver.html#ggaa76e51e2201d4058f4274ca420c165f6a6fefdf17cbb1204ac17187e4c6c96eeb">DS18B20_MODE_MATCH_ROM</a></div><div class="ttdeci">@ DS18B20_MODE_MATCH_ROM</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00082">driver_ds18b20.h:82</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_ga03a7158f8be182347f2263bb61efb869"><div class="ttname"><a href="group__ds18b20__interface__driver.html#ga03a7158f8be182347f2263bb61efb869">ds18b20_interface_deinit</a></div><div class="ttdeci">uint8_t ds18b20_interface_deinit(void)</div><div class="ttdoc">interface bus deinit</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00059">driver_ds18b20_interface_template.c:59</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_ga0fc93e0908a80f48e859cf1aeb8d3136"><div class="ttname"><a href="group__ds18b20__interface__driver.html#ga0fc93e0908a80f48e859cf1aeb8d3136">ds18b20_interface_delay_ms</a></div><div class="ttdeci">void ds18b20_interface_delay_ms(uint32_t ms)</div><div class="ttdoc">interface delay ms</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00095">driver_ds18b20_interface_template.c:95</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_ga58ec641650609db605a648fc4d9709f0"><div class="ttname"><a href="group__ds18b20__interface__driver.html#ga58ec641650609db605a648fc4d9709f0">ds18b20_interface_write</a></div><div class="ttdeci">uint8_t ds18b20_interface_write(uint8_t value)</div><div class="ttdoc">interface bus write</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00085">driver_ds18b20_interface_template.c:85</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_gaae02ff3e162c03d6d44c502aa2c7c287"><div class="ttname"><a href="group__ds18b20__interface__driver.html#gaae02ff3e162c03d6d44c502aa2c7c287">ds18b20_interface_init</a></div><div class="ttdeci">uint8_t ds18b20_interface_init(void)</div><div class="ttdoc">interface bus init</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00047">driver_ds18b20_interface_template.c:47</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_gab0b723752250505718028cea3bfe2e33"><div class="ttname"><a href="group__ds18b20__interface__driver.html#gab0b723752250505718028cea3bfe2e33">ds18b20_interface_read</a></div><div class="ttdeci">uint8_t ds18b20_interface_read(uint8_t *value)</div><div class="ttdoc">interface bus read</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00072">driver_ds18b20_interface_template.c:72</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_gabb823545b537ecf6e62e279baaac6dc4"><div class="ttname"><a href="group__ds18b20__interface__driver.html#gabb823545b537ecf6e62e279baaac6dc4">ds18b20_interface_debug_print</a></div><div class="ttdeci">void ds18b20_interface_debug_print(const char *const fmt,...)</div><div class="ttdoc">interface print format data</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00133">driver_ds18b20_interface_template.c:133</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_gae2c7e5e56d2c7c9cbe0708c33b0fa08e"><div class="ttname"><a href="group__ds18b20__interface__driver.html#gae2c7e5e56d2c7c9cbe0708c33b0fa08e">ds18b20_interface_disable_irq</a></div><div class="ttdeci">void ds18b20_interface_disable_irq(void)</div><div class="ttdoc">interface disable the interrupt</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00123">driver_ds18b20_interface_template.c:123</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_gaf6df67e763bd6dc9cd1f9b3f81a4ba77"><div class="ttname"><a href="group__ds18b20__interface__driver.html#gaf6df67e763bd6dc9cd1f9b3f81a4ba77">ds18b20_interface_enable_irq</a></div><div class="ttdeci">void ds18b20_interface_enable_irq(void)</div><div class="ttdoc">interface enable the interrupt</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00114">driver_ds18b20_interface_template.c:114</a></div></div>
<div class="ttc" id="agroup__ds18b20__interface__driver_html_gaffa80ae3f3b868b8acec66e67cd6533b"><div class="ttname"><a href="group__ds18b20__interface__driver.html#gaffa80ae3f3b868b8acec66e67cd6533b">ds18b20_interface_delay_us</a></div><div class="ttdeci">void ds18b20_interface_delay_us(uint32_t us)</div><div class="ttdoc">interface delay us</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__interface__template_8c_source.html#l00105">driver_ds18b20_interface_template.c:105</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_ga02ffa673971e5a9c312a49db319a1a60"><div class="ttname"><a href="group__ds18b20__link__driver.html#ga02ffa673971e5a9c312a49db319a1a60">DRIVER_DS18B20_LINK_DISABLE_IRQ</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_DISABLE_IRQ(HANDLE, FUC)</div><div class="ttdoc">link disable_irq function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00221">driver_ds18b20.h:221</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_ga05c7f541eb13b7fc53e17e88c4dec347"><div class="ttname"><a href="group__ds18b20__link__driver.html#ga05c7f541eb13b7fc53e17e88c4dec347">DRIVER_DS18B20_LINK_ENABLE_IRQ</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_ENABLE_IRQ(HANDLE, FUC)</div><div class="ttdoc">link enable_irq function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00213">driver_ds18b20.h:213</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_ga68d0440d16dd362e2f89bf3c6945d3cd"><div class="ttname"><a href="group__ds18b20__link__driver.html#ga68d0440d16dd362e2f89bf3c6945d3cd">DRIVER_DS18B20_LINK_BUS_WRITE</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_BUS_WRITE(HANDLE, FUC)</div><div class="ttdoc">link bus_write function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00189">driver_ds18b20.h:189</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_ga69860fef169e92a4e642304244c878be"><div class="ttname"><a href="group__ds18b20__link__driver.html#ga69860fef169e92a4e642304244c878be">DRIVER_DS18B20_LINK_DEBUG_PRINT</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_DEBUG_PRINT(HANDLE, FUC)</div><div class="ttdoc">link debug_print function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00229">driver_ds18b20.h:229</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_ga995e0ba6342a4fdd07464acfd3ded21b"><div class="ttname"><a href="group__ds18b20__link__driver.html#ga995e0ba6342a4fdd07464acfd3ded21b">DRIVER_DS18B20_LINK_BUS_INIT</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_BUS_INIT(HANDLE, FUC)</div><div class="ttdoc">link bus_init function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00165">driver_ds18b20.h:165</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_gab9c69affb4d2f518a8dd716a4ae0e582"><div class="ttname"><a href="group__ds18b20__link__driver.html#gab9c69affb4d2f518a8dd716a4ae0e582">DRIVER_DS18B20_LINK_BUS_READ</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_BUS_READ(HANDLE, FUC)</div><div class="ttdoc">link bus_read function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00181">driver_ds18b20.h:181</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_gad39c2a4f7dba94bfa1c5c60dd9879c4b"><div class="ttname"><a href="group__ds18b20__link__driver.html#gad39c2a4f7dba94bfa1c5c60dd9879c4b">DRIVER_DS18B20_LINK_DELAY_US</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_DELAY_US(HANDLE, FUC)</div><div class="ttdoc">link delay_us function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00205">driver_ds18b20.h:205</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_gada03625a3e86545827079d7025dce366"><div class="ttname"><a href="group__ds18b20__link__driver.html#gada03625a3e86545827079d7025dce366">DRIVER_DS18B20_LINK_BUS_DEINIT</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_BUS_DEINIT(HANDLE, FUC)</div><div class="ttdoc">link bus_deinit function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00173">driver_ds18b20.h:173</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_gada3646f54931552e58b3955042b3f3a1"><div class="ttname"><a href="group__ds18b20__link__driver.html#gada3646f54931552e58b3955042b3f3a1">DRIVER_DS18B20_LINK_DELAY_MS</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_DELAY_MS(HANDLE, FUC)</div><div class="ttdoc">link delay_ms function</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00197">driver_ds18b20.h:197</a></div></div>
<div class="ttc" id="agroup__ds18b20__link__driver_html_gaeb6d8c99dd1508afac2d506e0fbba748"><div class="ttname"><a href="group__ds18b20__link__driver.html#gaeb6d8c99dd1508afac2d506e0fbba748">DRIVER_DS18B20_LINK_INIT</a></div><div class="ttdeci">#define DRIVER_DS18B20_LINK_INIT(HANDLE, STRUCTURE)</div><div class="ttdoc">initialize ds18b20_handle_t structure</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00157">driver_ds18b20.h:157</a></div></div>
<div class="ttc" id="agroup__ds18b20__test__driver_html_gaeeb0a8054e6c02fb9854cece8fd3deb9"><div class="ttname"><a href="group__ds18b20__test__driver.html#gaeeb0a8054e6c02fb9854cece8fd3deb9">ds18b20_read_test</a></div><div class="ttdeci">uint8_t ds18b20_read_test(uint32_t times)</div><div class="ttdoc">read test</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20__read__test_8c_source.html#l00050">driver_ds18b20_read_test.c:50</a></div></div>
<div class="ttc" id="astructds18b20__handle__s_html"><div class="ttname"><a href="structds18b20__handle__s.html">ds18b20_handle_s</a></div><div class="ttdoc">ds18b20 handle structure definition</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00108">driver_ds18b20.h:109</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html"><div class="ttname"><a href="structds18b20__info__s.html">ds18b20_info_s</a></div><div class="ttdoc">ds18b20 info structure definition</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00127">driver_ds18b20.h:128</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_a3366a5dce9b829e03c3d321c2b4df3f6"><div class="ttname"><a href="structds18b20__info__s.html#a3366a5dce9b829e03c3d321c2b4df3f6">ds18b20_info_s::temperature_max</a></div><div class="ttdeci">float temperature_max</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00136">driver_ds18b20.h:136</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_a3d2b12bcac7a85ea8646bff9debe8660"><div class="ttname"><a href="structds18b20__info__s.html#a3d2b12bcac7a85ea8646bff9debe8660">ds18b20_info_s::supply_voltage_max_v</a></div><div class="ttdeci">float supply_voltage_max_v</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00133">driver_ds18b20.h:133</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_a41b0bd442708b70d252c50b92c75265a"><div class="ttname"><a href="structds18b20__info__s.html#a41b0bd442708b70d252c50b92c75265a">ds18b20_info_s::driver_version</a></div><div class="ttdeci">uint32_t driver_version</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00137">driver_ds18b20.h:137</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_a8f9dbe66ac0b66ebae0a36fcb4ba368e"><div class="ttname"><a href="structds18b20__info__s.html#a8f9dbe66ac0b66ebae0a36fcb4ba368e">ds18b20_info_s::temperature_min</a></div><div class="ttdeci">float temperature_min</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00135">driver_ds18b20.h:135</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_a9db82802561bf22d799b03a345f1d1dc"><div class="ttname"><a href="structds18b20__info__s.html#a9db82802561bf22d799b03a345f1d1dc">ds18b20_info_s::max_current_ma</a></div><div class="ttdeci">float max_current_ma</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00134">driver_ds18b20.h:134</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_ad25285dbf810c90f8eaf3fcef6f2b2ea"><div class="ttname"><a href="structds18b20__info__s.html#ad25285dbf810c90f8eaf3fcef6f2b2ea">ds18b20_info_s::manufacturer_name</a></div><div class="ttdeci">char manufacturer_name[32]</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00130">driver_ds18b20.h:130</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_ad8bde6ddadaf43d951e62f3befb9d35a"><div class="ttname"><a href="structds18b20__info__s.html#ad8bde6ddadaf43d951e62f3befb9d35a">ds18b20_info_s::supply_voltage_min_v</a></div><div class="ttdeci">float supply_voltage_min_v</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00132">driver_ds18b20.h:132</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_aebaa6c28dd4f2c3dc27566fcb910fd28"><div class="ttname"><a href="structds18b20__info__s.html#aebaa6c28dd4f2c3dc27566fcb910fd28">ds18b20_info_s::interface</a></div><div class="ttdeci">char interface[8]</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00131">driver_ds18b20.h:131</a></div></div>
<div class="ttc" id="astructds18b20__info__s_html_af890958c72bd715cc6454a10dc846ae6"><div class="ttname"><a href="structds18b20__info__s.html#af890958c72bd715cc6454a10dc846ae6">ds18b20_info_s::chip_name</a></div><div class="ttdeci">char chip_name[32]</div><div class="ttdef"><b>Definition:</b> <a href="driver__ds18b20_8h_source.html#l00129">driver_ds18b20.h:129</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_13e138d54eb8818da29c3992edef070a.html">test</a></li><li class="navelem"><a class="el" href="driver__ds18b20__read__test_8c.html">driver_ds18b20_read_test.c</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
